package com.wn.ziroombackend.controller;


import com.wn.ziroombackend.entity.Areas;
import com.wn.ziroombackend.service.AreasService;
import com.wn.ziroombackend.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-28 10:03:42
 * @since 2023-02-23 02:27:54
 */
@RestController
@RequestMapping("/areas")
public class AreasController {
    @Autowired
    private AreasService areasService;


    @RequestMapping("/getAreas")
    public R getAreas(){
        List<Areas> areasList = areasService.getShangHaiArea();

        return R.ok("ok").data("areaList",areasList);
    }

}

